package com.snl.micro.blog.comments.dao.respository.impl;

import com.snl.micro.blog.comments.dao.mapper.CommentMapper;
import com.snl.micro.blog.comments.dao.respository.CommentRepository;
import com.snl.micro.blog.comments.pojo.po.CommentInfoPo;
import com.snl.micro.blog.common.query.CommentQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class CommentRepositoryImplement implements CommentRepository {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public List<CommentInfoPo> query(CommentQuery query) {
        return commentMapper.query(query);
    }

    @Override
    public void save(CommentInfoPo commentInfoPo) {
         commentMapper.save(commentInfoPo);
    }
}
